<style type="text/css">
</style>
<div class="fui-page fui-page-current" style="background:#fff">
	<div class="fui-content">
		<div class="fui-cell-group fui-cell-click" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-info">
						<div class="fui-cell-info text bold" style="font-size:1.2rem;color:#333">我的养殖</div>
					</div>
				</div>
				<div class="fui-tab fui-tab-danger" style="font-size:0.65rem">
					<a ng-class="{'external':1,' active':pagedata.params.status == 0}" href="javascript:" ng-click="pagedata.params.status=0;tool.get_list('jy_farmer/worker_adopt/list/',true)">待接单</a>
					<a ng-class="{'external':1,' active':pagedata.params.status == 1}" href="javascript:" ng-click="pagedata.params.status=1;tool.get_list('jy_farmer/worker_adopt/list/',true)">喂养中</a>
					<a ng-class="{'external':1,' active':pagedata.params.status == 3}" href="javascript:" ng-click="pagedata.params.status=3;tool.get_list('jy_farmer/worker_adopt/list/',true)">已完成</a>
				</div>
		</div>
		<div class="jy-content">
		<div ng-repeat="item in pagedata.list" class="fui-cell-group radius" style="padding:0.5rem">
				<div class="fui-cell" style="width:100%;background-color:#52ae89;border-radius: 0.2rem;color:#fff;text-align:left;padding:0.5rem">
					<div class="fui-cell-text" style="color:#fff;line-height:1.0rem">
						<div class="bold">{{item.animal.title}}</div>
						<div style="font-size:0.6rem">所属分类：{{item.animal.atitle}}</div>
					</div>
					<div class="fui-cell-remark noremark" style="color:#fff;line-height:1.0rem;border-left:1px solid #fff;padding-left:0.3rem">
						<div>{{item.number}}</div>
						<div style="font-size:0.6rem">编号</div>
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:3rem"><img style="border-radius:100%;width:50px;height:50px" ng-src="{{tomedia(item.animal.image) || '../core/resource/images/nopic.jpg'}}"  /></div>
					<div class="fui-cell-text">
						<div class="text bold">总购买：{{item.order.total}}只</div>
						<div class="text" style="color:#f60;font-size:0.60rem">周期：{{item.animal.growtime}}天</div>
						<div class="text" style="color:#f60;font-size:0.60rem">预计成熟期：{{item.animal.shouday}}</div>
						<div class="subtitle" style="font-size:0.6rem">{{item.lev_name}}</div>
						<div ng-if="item.shoukg>0" class="text bold" style="color:red;font-size:0.60rem">实际收获：{{item.shoukg}}KG</div>
						<div ng-if="item.order.sendtype==1 && item.order.address" class="subtitle towline" style="-webkit-line-clamp: 2;font-size:0.55rem">
							<span>寄送地址：{{item.order.address || '无'}}</span>
						</div>
					</div>
				</div>
				<div class="fui-cell-title r" ng-if="item.status==1 || item.status==2">
					<div ng-if="item.totype4!=1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_farmer/worker_adopt/adopt/id='+item.id)">立即喂养</div>
					<div ng-if="item.totype4==1" class="btn btn-sm btn-default disabled">今日已喂养</div>
					<div ng-if="item.isshou==1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_farmer/worker_adopt/success/id='+item.id)">完成收获</div>
				</div>
				<div class="fui-cell-title r" ng-if="item.status==3">
					<div class="btn btn-sm btn-success" href="javascript:" ng-click="pagedata.itemid=item.id;pagedata.gostatus4=true">收获成果</div>
				</div>
		</div>
		<div ng-if="pagedata.list.length<=0" class="content-empty">
			<i class='icon icon-chakanpingjia'></i>
			<div>暂无相关养殖</div>
		</div>
		<div ng-show="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
		</div>
	</div>
</div>
<div ng-if="pagedata.gostatus4" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.gostatus4=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 2rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行[提交收获成果]操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-dixiaofei" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="收获重量KG" ng-model="pagedata.post.shoukg"></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post({},'jy_farmer/worker_adopt/status4/id='+pagedata.itemid+'&shoukg='+pagedata.post.shoukg)">确认提交</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.tool.get_list('jy_farmer/worker_adopt/list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_farmer/worker_adopt/list/');
	}
</script>

